package j.framework.core;

import java.io.Serializable;

/**
 * User: jason
 * Date: 2014/11/7 16:51
 */
public class DictItem implements Serializable {
    private static final long serialVersionUID = 20120518140823L;
    private String code;//字典项代码
    private String name;//字典项名称
    private boolean disabled = false;//是否被禁用
    private String value;//对应的值，选填项
    private String groupName;//字典项组名

    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

    public boolean isDisabled() {
        return disabled;
    }
    public void setDisabled(boolean disabled) {
        this.disabled = disabled;
    }

    public String getValue() {
        return value;
    }
    public void setValue(String value) {
        this.value = value;
    }

    public String getGroupName() {
        return groupName;
    }
    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    @Override
    public int hashCode() {
        return code.hashCode();
    }
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        DictItem item = (DictItem) o;

        if (code != null ? !code.equals(item.code) : item.code != null) return false;

        return true;
    }
}
